home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / GNU / GNUPLOTsrc.lha / term / pstricks.trm < prev    next >
Encoding:
Text File  |  1996-01-22  |  15.5 KB  |  578 lines

  1. /* Hey Emacs this is -*- C -*-
  2.  * 
  3.  * $Id: pstricks.trm,v 1.6 1995/12/20 21:48:09 drd Exp $
  4.  */
  5.  
  6. /* GNUPLOT - pstricks.trm */
  7. /*
  8.  * Copyright (C) 1990 - 1993
  9.  *
  10.  * Permission to use, copy, and distribute this software and its
  11.  * documentation for any purpose with or without fee is hereby granted,
  12.  * provided that the above copyright notice appear in all copies and
  13.  * that both that copyright notice and this permission notice appear
  14.  * in supporting documentation.
  15.  *
  16.  * Permission to modify the software is granted, but not the right to
  17.  * distribute the modified code.  Modifications are to be distributed
  18.  * as patches to released version.
  19.  *
  20.  * This software  is provided "as is" without express or implied warranty.
  21.  *
  22.  * This file is included by ../term.c.
  23.  *
  24.  * This terminal driver supports:
  25.  *   The PSTricks macros for LaTeX.
  26.  *
  27.  * AUTHORS
  28.  *   David Kotz
  29.  *
  30.  *   Raymond Toy    toy@soho.crd.ge.com
  31.  *    Modified the eepic.trm file to use PSTricks macros instead.
  32.  *
  33.  *    20 Mar 93:
  34.  *        Utilized many suggestions from Gisli Ottarsson
  35.  *        (gisli@liapunov.eecs.umich.edu) to create a new version.
  36.  *        Should also work with TeX as well as LaTeX.
  37.  *
  38.  *        If you have PSTricks version 0.91, #define OLD_PST to
  39.  *        get the right dots.
  40.  *
  41.  *        Added a really ugly hack (enabled by default) to print
  42.  *        "nice" numbers for axis labels.  This should really be at
  43.  *        a higher level in the code, but I'm lazy right now.
  44.  *
  45.  * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  46.  *
  47.  */
  48.  
  49. /*
  50.  *  This file contains the PSTricks terminal driver, intended for use with the
  51.  *  pstricks.sty macro package for LaTeX. This is an alternative to the
  52.  *  eepic and latex driver. You need pstricks.sty, and, of course, a printer
  53.  *  that understands PostScript.  Ghostscript understands Postscript too.
  54.  *
  55.  *  PSTricks is available via anonymous ftp from the /pub directory
  56.  *  at Princeton.EDU.  This driver definitely does not come close to
  57.  *  using the full capability of the PSTricks package.
  58.  */
  59. /*
  60.  * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
  61.  */
  62.  
  63. #ifndef GOT_DRIVER_H
  64. #include "driver.h"
  65. #endif
  66.  
  67. #ifdef TERM_REGISTER
  68. register_term(pstricks)
  69. #endif
  70.  
  71. #ifdef TERM_PROTO
  72. TERM_PUBLIC void PSTRICKS_init __P((void));
  73. TERM_PUBLIC void PSTRICKS_graphics __P((void));
  74. TERM_PUBLIC void PSTRICKS_text __P((void));
  75. TERM_PUBLIC void PSTRICKS_linetype __P((int linetype));
  76. TERM_PUBLIC void PSTRICKS_move __P((unsigned int x, unsigned int y));
  77. TERM_PUBLIC void PSTRICKS_point __P((unsigned int x, unsigned int y, int number));
  78. TERM_PUBLIC void PSTRICKS_vector __P((unsigned int ux, unsigned int uy));
  79. TERM_PUBLIC void PSTRICKS_arrow __P((unsigned int sx, unsigned int sy, unsigned int ex, unsigned int ey, TBOOLEAN head));
  80. TERM_PUBLIC void PSTRICKS_put_text __P((unsigned int x, unsigned int y, char str[]));
  81. TERM_PUBLIC int PSTRICKS_justify_text __P((enum JUSTIFY mode));
  82. TERM_PUBLIC int PSTRICKS_text_angle __P((int angle));
  83. TERM_PUBLIC void PSTRICKS_reset __P((void));
  84.  
  85. #define PSTRICKS_XMAX 10000.0
  86. #define PSTRICKS_YMAX 10000.0
  87.  
  88. #define PSTRICKS_HTIC    150
  89. #define PSTRICKS_VTIC    200
  90. #define PSTRICKS_HCHAR    160
  91. #define PSTRICKS_VCHAR    420
  92. #endif /* TERM_PROTO */
  93.  
  94. #ifndef TERM_PROTO_ONLY
  95. #ifdef TERM_BODY
  96. static void PSTRICKS_endline __P((void));
  97.  
  98. static float    PSTRICKS_xscale = 1.0;
  99. static float    PSTRICKS_yscale = 1.0;
  100. static float    PSTRICKS_posx;
  101. static float    PSTRICKS_posy;
  102. enum JUSTIFY    PSTRICKS_justify = LEFT;
  103. static int      PSTRICKS_angle = 0;
  104.  
  105. #define    PSTRICKS_TINY_DOT    0.00025    /* A tiny dot */
  106.  
  107. /* POINTS */
  108. #define PSTRICKS_POINT_TYPES 12        /* we supply more point types */
  109. static char    *PSTRICKS_points[] =
  110. {
  111.     "\\PST@Diamond",
  112.     "\\PST@Plus",
  113.     "\\PST@Square",
  114.     "\\PST@Cross",
  115.     "\\PST@Circle",
  116.     "\\PST@Triangle",
  117.     "\\PST@Pentagon",
  118.     "\\PST@Filldiamond",
  119.     "\\PST@Fillsquare",
  120.     "\\PST@Filltriangle",
  121.     "\\PST@Fillcircle",
  122.     "\\PST@Fillpentagon"
  123. };
  124.  
  125. /* LINES */
  126. #define PSTRICKS_NUMLINES 6        /* number of linetypes below */
  127. static char    *PSTRICKS_lines[] =
  128. {
  129.     "\\PST@Border",
  130.     "\\PST@Axes",
  131.     "\\PST@Solid",
  132.     "\\PST@Dashed",
  133.     "\\PST@Dotted",
  134.     "\\PST@LongDash"
  135. };
  136.  
  137. static int      PSTRICKS_type;        /* current line type */
  138. static TBOOLEAN  PSTRICKS_inline = FALSE;/* are we in the middle of a line */
  139. static void     PSTRICKS_endline();    /* terminate any line in progress */
  140. static int      PSTRICKS_linecount = 0;    /* number of points in line so far */
  141.  
  142. #define PSTRICKS_LINEMAX 100        /* max value for linecount */
  143.  
  144. /*
  145.  * Handle options
  146.  */
  147.  
  148. static int PST_hack_text = TRUE;            /* Hack text on */
  149. static int PST_unit_plot = FALSE;            /* Unit-sized plot off */
  150.  
  151. TERM_PUBLIC void
  152. PSTRICKS_options()
  153. {
  154.     if (!END_OF_COMMAND) {
  155.     if (almost_equals(c_token, "no$hacktext")) {
  156.         PST_hack_text = FALSE;
  157.         c_token++;
  158.     } else if (almost_equals(c_token, "u$nit")) {
  159.         PST_unit_plot = TRUE;
  160.         c_token++;
  161.     }
  162.     }
  163. }
  164.  
  165. TERM_PUBLIC void
  166. PSTRICKS_init()
  167. {
  168.     PSTRICKS_posx = PSTRICKS_posy = 0;
  169.     PSTRICKS_linetype(-1);
  170.     fprintf(outfile, "%% GNUPLOT: LaTeX picture using PSTRICKS macros\n");
  171. }
  172.  
  173.  
  174. TERM_PUBLIC void
  175. PSTRICKS_graphics()
  176. {
  177.     fprintf(outfile, "%% Define new PST objects, if not already defined\n");
  178.  
  179.     fprintf(outfile, "\\ifx\\PSTloaded\\undefined\n");
  180.     fprintf(outfile, "\\def\\PSTloaded{t}\n");
  181.  
  182.     fprintf(outfile, "\\psset{arrowsize=.01 3.2 1.4 .3}\n");
  183.     fprintf(outfile, "\\psset{dotsize=.01}\n");
  184.  
  185.     fprintf(outfile, "\\catcode`@=11\n\n");
  186.  
  187.     /* Define line type objects */
  188.     fprintf(outfile, "\\newpsobject{PST@Border}{psline}{linewidth=.0015,linestyle=solid}\n");
  189.     fprintf(outfile, "\\newpsobject{PST@Axes}{psline}{linewidth=.0015,linestyle=dotted,dotsep=.004}\n");
  190.     fprintf(outfile, "\\newpsobject{PST@Solid}{psline}{linewidth=.0015,linestyle=solid}\n");
  191.     fprintf(outfile, "\\newpsobject{PST@Dashed}{psline}{linewidth=.0015,linestyle=dashed,dash=.01 .01}\n");
  192.     fprintf(outfile, "\\newpsobject{PST@Dotted}{psline}{linewidth=.0025,linestyle=dotted,dotsep=.008}\n");
  193.     fprintf(outfile, "\\newpsobject{PST@LongDash}{psline}{linewidth=.0015,linestyle=dashed,dash=.02 .01}\n");
  194.  
  195.     /* Define point objects */
  196.     
  197. #ifdef    OLD_PST
  198.     /* PSTricks version 0.91 had x and diamond dot types */
  199.     fprintf(outfile, "\\newpsobject(PST@Diamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=diamond}\n");
  200.     fprintf(outfile, "\\newpsobject(PST@Filldiamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=diamond*}\n");
  201.     fprintf(outfile, "\\newpsobject{PST@Cross}{psdots}{linewidth=.001,linestyle=solid,dotstyle=x}\n");
  202. #else
  203.     /* Newer versions use rotated plus and square to get the x and diamond dots */
  204.     fprintf(outfile, "\\newpsobject{PST@Diamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square,dotangle=45}\n");
  205.     fprintf(outfile, "\\newpsobject{PST@Filldiamond}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square*,dotangle=45}\n");
  206.     fprintf(outfile, "\\newpsobject{PST@Cross}{psdots}{linewidth=.001,linestyle=solid,dotstyle=+,dotangle=45}\n");
  207. #endif
  208.  
  209.     fprintf(outfile, "\\newpsobject{PST@Plus}{psdots}{linewidth=.001,linestyle=solid,dotstyle=+}\n");
  210.     fprintf(outfile, "\\newpsobject{PST@Square}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square}\n");
  211.     fprintf(outfile, "\\newpsobject{PST@Circle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=o}\n");
  212.     fprintf(outfile, "\\newpsobject{PST@Triangle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=triangle}\n");
  213.     fprintf(outfile, "\\newpsobject{PST@Pentagon}{psdots}{linewidth=.001,linestyle=solid,dotstyle=pentagon}\n");
  214.     fprintf(outfile, "\\newpsobject{PST@Fillsquare}{psdots}{linewidth=.001,linestyle=solid,dotstyle=square*}\n");
  215.     fprintf(outfile, "\\newpsobject{PST@Fillcircle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=*}\n");
  216.     fprintf(outfile, "\\newpsobject{PST@Filltriangle}{psdots}{linewidth=.001,linestyle=solid,dotstyle=triangle*}\n");
  217.     fprintf(outfile, "\\newpsobject{PST@Fillpentagon}{psdots}{linewidth=.001,linestyle=solid,dotstyle=pentagon*}\n");
  218.  
  219.     /* Define arrow object */
  220.     fprintf(outfile, "\\newpsobject{PST@Arrow}{psline}{linewidth=.001,linestyle=solid}\n");
  221.  
  222.     fprintf(outfile, "\\catcode`@=12\n\n");
  223.     fprintf(outfile, "\\fi\n");
  224.  
  225.     /* Set the scaled plot size, if it's not a unit plot */
  226.     if (!PST_unit_plot) {
  227.     fprintf(outfile, "\\psset{unit=%fin,xunit=%fin,yunit=%fin}\n",
  228.         5.0 * PSTRICKS_xscale,
  229.         5.0 * PSTRICKS_xscale,
  230.         3.0 * PSTRICKS_yscale);
  231.     }
  232.     
  233.     fprintf(outfile, "\\pspicture(0,0)(1,1)\n");
  234.     fprintf(outfile, "\\ifx\\nofigs\\undefined\n");
  235.     fprintf(outfile, "\\catcode`@=11\n\n");
  236. }
  237.  
  238.  
  239. TERM_PUBLIC void
  240. PSTRICKS_text()
  241. {
  242.     PSTRICKS_endline();
  243.     fprintf(outfile, "\\catcode`@=12\n");
  244.     fprintf(outfile, "\\fi\n");
  245.     fprintf(outfile, "\\endpspicture\n");
  246. }
  247.  
  248.  
  249. TERM_PUBLIC void
  250. PSTRICKS_linetype(linetype)
  251. int linetype;
  252. {
  253.     PSTRICKS_endline();
  254.  
  255.     if (linetype >= PSTRICKS_NUMLINES - 2)
  256.     linetype %= (PSTRICKS_NUMLINES - 2);
  257.  
  258.     PSTRICKS_type = linetype;
  259. }
  260.  
  261.  
  262.  
  263. TERM_PUBLIC void
  264. PSTRICKS_move(x, y)
  265. unsigned int x;
  266. unsigned int y;
  267. {
  268.     PSTRICKS_endline();
  269.  
  270.     PSTRICKS_posx = x / PSTRICKS_XMAX;
  271.     PSTRICKS_posy = y / PSTRICKS_YMAX;
  272. }
  273.  
  274.  
  275. TERM_PUBLIC void
  276. PSTRICKS_point(x, y, number)        /* version of line_and_point */
  277. unsigned x;
  278. unsigned y;
  279. int number;
  280. {
  281.     PSTRICKS_move(x, y);
  282.  
  283.     /* Print the character defined by 'number'; number < 0 means
  284.       to use a dot, otherwise one of the defined points. */
  285.  
  286.     if (number < 0) {
  287.     fprintf(outfile, "\\qdisk(%.4f,%.4f){%.4f}\n",
  288.         x / PSTRICKS_XMAX,
  289.         y / PSTRICKS_YMAX,
  290.         PSTRICKS_TINY_DOT);
  291.     } else {
  292.     fprintf(outfile, "%s(%.4f,%.4f)\n",
  293.         PSTRICKS_points[number % PSTRICKS_POINT_TYPES],
  294.         x / PSTRICKS_XMAX,
  295.         y / PSTRICKS_YMAX);
  296.     }
  297. }
  298.  
  299.  
  300. TERM_PUBLIC void
  301. PSTRICKS_vector(ux, uy)
  302. unsigned ux;
  303. unsigned uy;
  304. {
  305.     if (!PSTRICKS_inline) {
  306.     PSTRICKS_inline = TRUE;
  307.  
  308.     /* Start a new line. This depends on line type */
  309.     fprintf(outfile, "%s(%.4f,%.4f)\n", PSTRICKS_lines[PSTRICKS_type + 2],
  310.         PSTRICKS_posx, PSTRICKS_posy);
  311.     PSTRICKS_linecount = 1;
  312.     } else {
  313.     /*
  314.      * Even though we are in middle of a path,
  315.      * we may want to start a new path command.
  316.      * If they are too long then latex will choke.
  317.      */
  318.     if (PSTRICKS_linecount++ >= PSTRICKS_LINEMAX) {
  319. /*        fprintf(outfile, "\n"); */
  320.         fprintf(outfile, "%s(%.4f,%.4f)\n", PSTRICKS_lines[PSTRICKS_type + 2],
  321.             PSTRICKS_posx, PSTRICKS_posy);
  322.         PSTRICKS_linecount = 1;
  323.     }
  324.     }
  325.     PSTRICKS_posx = ux / PSTRICKS_XMAX;
  326.     PSTRICKS_posy = uy / PSTRICKS_YMAX;
  327.     fprintf(outfile, "(%.4f,%.4f)\n", PSTRICKS_posx, PSTRICKS_posy);
  328. }
  329.  
  330. static void
  331. PSTRICKS_endline()
  332. {
  333.     if (PSTRICKS_inline) {
  334.     fprintf(outfile, "\n");
  335.     PSTRICKS_inline = FALSE;
  336.     }
  337. }
  338.  
  339.  
  340. TERM_PUBLIC void
  341. PSTRICKS_arrow(sx, sy, ex, ey, head)
  342. unsigned int sx;
  343. unsigned int sy;
  344. unsigned int ex;
  345. unsigned int ey;
  346. TBOOLEAN head;
  347. {
  348.     fprintf(outfile, "\\PST@Arrow%s(%.4f,%.4f)(%.4f,%.4f)\n",
  349.         head ? "{->}" : "",
  350.         sx / PSTRICKS_XMAX,
  351.         sy / PSTRICKS_YMAX,
  352.         ex / PSTRICKS_XMAX,
  353.         ey / PSTRICKS_YMAX);
  354.  
  355.     PSTRICKS_posx = ex / PSTRICKS_XMAX;
  356.     PSTRICKS_posy = ey / PSTRICKS_YMAX;
  357. }
  358.  
  359. /*
  360.  * A really ugly hack!!!
  361.  *
  362.  * This function takes an input string and hacks it up.  If the
  363.  * input string starts with a number, it converts the number into a
  364.  * TeX style number including exponential notation.  Thus, if
  365.  * the input is the string "3.14159e3 is a number", then
  366.  * the output is "$3.14159\cdot 10^{3}$ is a number", so that TeX
  367.  * will produce something nice.
  368.  *
  369.  * This is basically meant for producing axis labels that look nice.
  370.  *
  371.  * What a hack!
  372.  */
  373.  
  374.  
  375. static char *
  376. PSTRICKS_hack_text(s)
  377. char s[];
  378. {
  379.     double    value;
  380.     char    *ends;
  381.     static char    hack[BUFSIZ];
  382.  
  383.     /*
  384.      * Does the string start with a number?
  385.      */
  386.  
  387.     value = strtod(s, &ends);
  388.  
  389.     if (s == ends) {
  390.     /*
  391.      * This doesn't start a number, so just copy the string over
  392.      */
  393.     
  394.     strcpy(hack, s);
  395.     } else {
  396.     char *ptr;
  397.     
  398.     /*
  399.      * We have a number!  Check to see if the number
  400.      * is in scientific notation
  401.      */
  402.  
  403.     strncpy(hack, s, ends - s);
  404.     hack[ends - s] = '\0';
  405.     
  406.     ptr = strchr(hack, 'e');
  407.     if (ptr == NULL) {
  408.         ptr = strchr(hack, 'E');
  409.     }
  410.  
  411.     if (ptr != NULL) {
  412.         /*
  413.          * Exponential notation!  Let's get the mantissa and exponent separately
  414.          */
  415.  
  416.         double man_val;
  417.         int expo_val;
  418.  
  419.         *ptr = '\0';
  420.  
  421.         man_val = atof(hack);
  422.         expo_val = atoi(ptr + 1);
  423.  
  424.         if (man_val == 0) {
  425.         sprintf(hack, "0");
  426.         } else if (man_val == 1) {
  427.         sprintf(hack, "$10^{%d}$", expo_val);
  428.         } else if (man_val == (int) man_val) {
  429.         if (expo_val == 1) {
  430.             sprintf(hack, "$%d$", (int) man_val);
  431.         } else {
  432.             sprintf(hack, "$%d \\times 10^{%d}$", (int) man_val, expo_val);
  433.         }
  434.         } else {
  435.         if (expo_val == 1) {
  436.             sprintf(hack, "$%f$", man_val);
  437.         } else {
  438.             sprintf(hack, "$%f \\times 10^{%d}$", man_val, expo_val);
  439.         }
  440.         }
  441.     }
  442.  
  443.     /*
  444.      * Copy anything that's left of the string
  445.      */
  446.     
  447.     strcat(hack, ends);
  448.     }
  449.  
  450.     return hack;
  451. }
  452.  
  453. TERM_PUBLIC void
  454. PSTRICKS_put_text(x, y, str)
  455. unsigned int x;
  456. unsigned int y;
  457. char str[];
  458. {
  459.     PSTRICKS_endline();
  460.  
  461.     /* Skip this if the string is empty */
  462.  
  463.     if (strlen(str) > 0) {
  464.     fprintf(outfile, "\\rput");
  465.  
  466.     /* Set justification */
  467.  
  468.     switch (PSTRICKS_justify) {
  469.     case LEFT:
  470.         fprintf(outfile, "[l]");
  471.         break;
  472.     case CENTRE:
  473.         break;
  474.     case RIGHT:
  475.         fprintf(outfile, "[r]");
  476.         break;
  477.     }
  478.  
  479.     /* Set text angle */
  480.  
  481.     switch (PSTRICKS_angle) {
  482.     case 0:
  483.         break;
  484.     case 1:
  485.         fprintf(outfile, "{L}");
  486.         break;
  487.     }
  488.  
  489.     /* Set reference position and text */
  490.  
  491.     fprintf(outfile, "(%.4f,%.4f)",
  492.             x / PSTRICKS_XMAX,
  493.             y / PSTRICKS_YMAX);
  494.     if (PST_hack_text) {
  495.         char *hack;
  496.  
  497.         /* Hack leading numbers to something nice for TeX */
  498.         
  499.         hack = PSTRICKS_hack_text(str);
  500.         fprintf(outfile, "{%s}\n", hack);
  501.     } else {
  502.         fprintf(outfile, "{%s}\n", str);
  503.     }
  504.     }
  505. }
  506.  
  507.  
  508.  
  509. TERM_PUBLIC int 
  510. PSTRICKS_justify_text(mode)
  511. enum JUSTIFY mode;
  512. {
  513.     PSTRICKS_justify = mode;
  514.     return (TRUE);
  515. }
  516.  
  517. TERM_PUBLIC int 
  518. PSTRICKS_text_angle(angle)
  519. int angle;
  520. {
  521.     PSTRICKS_angle = angle;
  522.     return (TRUE);
  523. }
  524.  
  525. TERM_PUBLIC void
  526. PSTRICKS_reset()
  527. {
  528.     PSTRICKS_endline();
  529.     PSTRICKS_posx = PSTRICKS_posy = 0;
  530. }
  531.  
  532. #endif /* TERM_BODY */
  533.  
  534. #ifdef TERM_TABLE
  535.  
  536. TERM_TABLE_START(pstricks_driver)
  537.     "pstricks", "LaTeX picture environment with PSTricks macros",
  538.        PSTRICKS_XMAX, PSTRICKS_YMAX, PSTRICKS_VCHAR, PSTRICKS_HCHAR, 
  539.        PSTRICKS_VTIC, PSTRICKS_HTIC, PSTRICKS_options, PSTRICKS_init, PSTRICKS_reset, 
  540.        PSTRICKS_text, null_scale, PSTRICKS_graphics, PSTRICKS_move, PSTRICKS_vector, 
  541.        PSTRICKS_linetype, PSTRICKS_put_text, PSTRICKS_text_angle, 
  542.        PSTRICKS_justify_text, PSTRICKS_point, PSTRICKS_arrow, set_font_null
  543. TERM_TABLE_END(pstricks_driver)
  544.  
  545. #undef LAST_TERM
  546. #define LAST_TERM pstricks_driver
  547.  
  548. #endif /* TERM_TABLE */
  549. #endif /* TERM_PROTO_ONLY */
  550.  
  551. /*
  552.  * NAME: pstricks
  553.  *
  554.  * OPTIONS: hacktext|nohacktext (default hacktext) <-- ugly hack to give
  555.  *                                                      nice numbers
  556.  *          unit|nounit (default nounit)  <-- some kind of unscaled plot
  557.  *
  558.  * SUPPORTS: LaTeX picture environment with PSTricks macros
  559.  *
  560.  * Further Info: 
  561.  *  This driver is intended for use with the
  562.  *  pstricks.sty macro package for LaTeX. This is an alternative to the
  563.  *  eepic and latex driver. You need pstricks.sty, and, of course, a printer
  564.  *  that understands PostScript.  Ghostscript understands Postscript too.
  565.  *
  566.  *  PSTricks is available via anonymous ftp from the /pub directory
  567.  *  at Princeton.EDU.  This driver definitely does not come close to
  568.  *  using the full capability of the PSTricks package.
  569.  *
  570.  *        If you have PSTricks version 0.91, #define OLD_PST to
  571.  *        get the right dots.
  572.  *
  573.  *       My adds:
  574.  * I don't know whether pstricks will work with LaTeX2e but feel it might
  575.  * be obsoleted by a 2e package rather soon.
  576.  *
  577.  */
  578.